#include<iostream>
#include<cmath>
using namespace std;
class Point {
private:
    double x, y;
public:
    Point(double x, double y) {
        this->x = x;
        this->y = y;
    }

    double Getx() {
        return x;
    }

    double Gety() {
        return y;
    }

    double Distance(const Point &p)  //定义拷贝构造函数  
    {
        x -= p.x;
        y -= p.y;
        return sqrt(x * x + y * y);
    }
};

int main() {
    double x1, y1, x2, y2;
    double x;
    cout << "请顺序输入x1,y1,x2,y2，空格隔开"<<endl;
    cin >> x1 >> y1 >> x2 >> y2;
    Point P1(x1, y1);
    Point P2(x2, y2);

    x = P1.Distance(P2);
    cout.precision(2);//保留两位小数
    cout <<"两点的距离为"<< x << endl;

    return 0;
}
